// http://jdbartlett.github.com/innershiv | WTFPL License
window.innerShiv = (function() {
	var d, r,
      supportsHTML5 = function(){var g=document.createElement('div'),t='<m>x</m>';g.innerHTML=t;return g.innerHTML==t;};
  
	return (supportsHTML5()
    ? function(x) { return x; }
    : function(h, u) {
		if (!d) {
			d = document.createElement('div');
			r = document.createDocumentFragment();
			/*@cc_on d.style.display = 'none';@*/
		}
		
		var e = d.cloneNode(true);
		/*@cc_on document.body.appendChild(e);@*/
		e.innerHTML = h.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
		/*@cc_on document.body.removeChild(e);@*/
		
		if (u === false) { return e.childNodes; }
		
		var f = r.cloneNode(true), i = e.childNodes.length;
		while (i--) { f.appendChild(e.firstChild); }
		
		return f;
	});
})();
